package com.itheima.d05;

public class Test {
    public static void sum(int ...a ){
        int sum = 0;
        for (int i = 0; i < a.length; i++) {
            sum += a[i];
        }
        System.out.println(sum);
    }
    public static void main(String[] args) {
        sum(1,2,3,4,5,6,7,8,9,10);
        sum(1,2,3);
        sum();
    }
}
